package com.fangxing.module.user.dao;

import com.fangxing.module.user.entity.CheckCodeEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface CheckCodeRepository extends JpaRepository<CheckCodeEntity, String> {

    @Query("select e from CheckCodeEntity e where e.cellphone=?1 and e.deleted=0 and e.valid=1")
    CheckCodeEntity findByCellphone(String cellphone);

}
